package com.ruoyi.system.service;

import java.util.List;
import com.ruoyi.system.domain.HospitalSubscribeScheduleCapacity;

/**
 * 时段余量Service接口
 * 
 * @author ruoyi
 * @date 2025-04-28
 */
public interface IHospitalSubscribeScheduleCapacityService 
{
    /**
     * 查询时段余量
     * 
     * @param id 时段余量主键
     * @return 时段余量
     */
    public HospitalSubscribeScheduleCapacity selectHospitalSubscribeScheduleCapacityById(Long id);

    /**
     * 查询时段余量列表
     * 
     * @param hospitalSubscribeScheduleCapacity 时段余量
     * @return 时段余量集合
     */
    public List<HospitalSubscribeScheduleCapacity> selectHospitalSubscribeScheduleCapacityList(HospitalSubscribeScheduleCapacity hospitalSubscribeScheduleCapacity);

    /**
     * 新增时段余量
     * 
     * @param hospitalSubscribeScheduleCapacity 时段余量
     * @return 结果
     */
    public int insertHospitalSubscribeScheduleCapacity(HospitalSubscribeScheduleCapacity hospitalSubscribeScheduleCapacity);

    /**
     * 修改时段余量
     * 
     * @param hospitalSubscribeScheduleCapacity 时段余量
     * @return 结果
     */
    public int updateHospitalSubscribeScheduleCapacity(HospitalSubscribeScheduleCapacity hospitalSubscribeScheduleCapacity);

    /**
     * 批量删除时段余量
     * 
     * @param ids 需要删除的时段余量主键集合
     * @return 结果
     */
    public int deleteHospitalSubscribeScheduleCapacityByIds(Long[] ids);

    /**
     * 删除时段余量信息
     * 
     * @param id 时段余量主键
     * @return 结果
     */
    public int deleteHospitalSubscribeScheduleCapacityById(Long id);

    /**
     * 扣减时间段余量
     * @param scheduleCapacityId
     */
    int reduceNumberByScheduleCapacityId(Long scheduleCapacityId);

    /**
     * 根据时间段id恢复余量
     * @param scheduleCapacityId
     */
    int updateAvailableSlotsNumberById(Long scheduleCapacityId);
}
